<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数组分隔</title>
</head>
<body>
<script>
  var strings = ["aa", "bb", "cc", "dd","ee"];
  var result = "";
  var separator = "|";
  for (var i = 0; i < strings.length; i++) {
    result += strings[i];
    if (i !== strings.length - 1) {
      result += separator;
    }
  }
  document.write(result);
</script>
</body>
</html>